package com.vincent.vo;

import com.vincent.common.constant.RegValidatePattern;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by vincent on 15-1-3.
 */
public class RoleEditVo {
    @NotNull(message = "角色名字不能为空")
    @Pattern(regexp = RegValidatePattern.ROLE_NAME,message = "角色名字格式错误")
    @Length(max = 50,message = "角色名字格式错误")
    private String name;
    @NotNull(message = "角色描述不能为空")
    @Length(min = 1,max = 100,message = "角色描述格式错误")
    private String desc;
    @NotNull(message = "角色Id不能为空")
    private Integer id;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
